﻿using System;
using System.Web.UI;
using System.Web.UI.Design;

namespace Folks.UI.Design
{
	public class FolksContainerControlDesigner : ContainerControlDesigner
	{
		public override string GetDesignTimeHtml(DesignerRegionCollection regions)
		{
			regions.Add(new EditableDesignerRegion(this, "Content"));
			return DesignerHelper.GetHtmlWithRegions(Control.GetType().Name, Control.ID, 1);
		}

		protected override string GetErrorDesignTimeHtml(Exception e)
		{
			return DesignerHelper.GetHtmlWithDescription(e.Message, e.StackTrace, true);
		}

		private Control Control
		{
			get
			{
				return (Control)base.Component;
			}
		}
	}
}
